Robot program correcting apparatus

ABSTRACT

A robot program correcting apparatus, which displays three-dimensional models of a robot and a workpiece simultaneously on the screen of a display apparatus, and corrects an operation program for the robot, includes: a unit retrieving a robot operation program and a working position based on at least either a line or a surface computed from touchup points and on a touchup position or points representing a working position specified on the screen; a difference computing unit computing a difference between at least either the line or surface computed from the touchup points and at least either a line or a surface computed from the plurality of points as position information representing the retrieved working position; and a correcting unit correcting the robot operation program by computing the amount of correction based on the difference, thereby reducing the number of steps required when correcting the robot operation program.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the priority of JapanesePatent Application No. 2005-115841, filed Apr. 13, 2005, the contentsbeing incorporated herein by reference.

BACKGROUND OF THE INVENTION

(1) Field of the Invention

The present invention relates to a robot program correcting apparatusand, more particularly, to a robot program correcting apparatus forcorrecting a robot operation program, created off-line, to make it matchthe actual working position in the field.

(2) Description of Related Art

When a robot operation program is created in an off-line robot systemand applied in the field, if the off-line-created program is executedwithout any modification, the robot cannot perform the work, as plannedoff-line, because there is a discrepancy between the off-line world andthe world in the field. Accordingly, correction must be made to addressthis discrepancy.

In the prior art, teaching has been performed by jogging the robot inthe field and a correction made to the off-line created program so as tomatch the actual position. Jogging the robot means moving the robot inorder to teach it the actual working position.

Then, when applying the off-line created program in the field, it hasbeen practiced to operate the robot in the field to touch up the targetposition on the workpiece that corresponds to the taught positiondefined on the screen, and to correct the program by shifting the targetposition by multiplying the target position from the right by a unitarydifference matrix of four rows and four columns obtained as thedifference between the points representing the target position and thepoints representing the actually touched position, thereby accomplishingthe teaching and correction a position where a displacement hasoccurred.

SUMMARY OF THE INVENTION

With the prior art method, that shifts the target position bymultiplying the target position from the right only by a unitarydifference matrix obtained as the difference between the points, goodcorrection accuracy cannot be obtained. As a result, the prior artmethod requires repeating this correction by jogging the robot, and thishas led to the problem that it takes many man-hours to correct theprogram.

It is an object of the present invention to provide a robot programcorrecting apparatus that solves the above prior art problem and reducesthe number of steps required to correct a robot operation program basedon the motion path of the robot defined by the operation program and onthe touchup points that the robot has actually touched on the workpiecein the field.

MEANS FOR SOLVING THE PROBLEM

To achieve the above object, there is provided, according to a firstmode of the present invention, a robot program correcting apparatuswhich displays three-dimensional models of a robot and a workpiecesimultaneously on a screen of a display apparatus, and corrects anoperation program for the robot, comprising: a difference computing unitcomputing a difference between at least either a line or a surfacecomputed from touchup points and at least either a line or a surfacecomputed from points representing a working position specified on thescreen; and a correcting unit correcting the robot operation program bycomputing the amount of correction based on the difference.

According to a second mode of the present invention, instead of “adifference computing unit computing a difference between at least eithera line or a surface computed from touchup points and at least either aline or a surface computed from points representing a working positionspecified on the screen” used in the first mode, “difference computingunit computing a difference between at least either the line or surfacecomputed from the touchup points and at least either the line or surfacecomputed from the points representing the retrieved working position” isused.

Preferably, the robot program correcting apparatus further comprises: anoperation program storing unit storing a plurality of robot operationprograms by generating the programs based on positions of the robot andthe workpiece arranged on the screen; and a working position specifyingunit specifying on the screen a working position at which the robotworks on the workpiece arranged on the screen.

Further preferably, the curve and the curved surface are a spline curveand a spline surface, respectively.

Further preferably, the amount of correction for the operation programis obtained by correcting a mechanism model of the robot based on thedifference.

Further preferably, the mechanism model of the robot is a D-H parameter.

EFFECT OF THE INVENTION

When applying an off-line created program in the field, a spline curveor a spline surface is created from the working position on thecorrecting apparatus, and further, a spline curve or a spline surface iscreated by touching the corresponding touchup points in the field. Bycomparing the two curves or curved surfaces and obtaining theirdifference, and by correcting the robot program and the robot's D-Hparameters, the accuracy of correction of the robot program increases,and the number of steps required to correct the program in the field isreduced. This serves to simplify the work when applying the off-linecreated program in the field.

BRIEF DESCRIPTION OF THE DRAWINGS

The above object and features of the present invention will become moreapparent from the following description of the best mode for carryingout the present invention given with reference to the accompanyingdrawings, wherein:

FIG. 1 is a block diagram showing the configuration of a system whichincludes a robot program correcting apparatus according to the presentinvention;

FIG. 2 is a functional block diagram showing the configuration of arobot program correcting apparatus according to a first embodiment ofthe present invention;

FIG. 3 is a functional block diagram showing the configuration of arobot program correcting apparatus according to a second embodiment ofthe present invention;

FIG. 4 is a block diagram showing the detailed configuration of therobot program correcting apparatus and a robot controller 14 accordingto the first and second embodiments;

FIG. 5 is a flowchart for explaining the operation of the robot programcorrecting apparatus according to the first embodiment shown in FIG. 4;

FIG. 6 is a flowchart for explaining the operation of the robot programcorrecting apparatus according to the second embodiment shown in FIG. 4;

FIG. 7 is a diagram showing a working surface Ps displayed on the screenof a display apparatus 12 and its corresponding working surface (touchupsurface) Pt touched by an actual robot 16; and

FIG. 8 is a diagram showing the relationship between robot position andworkpiece position after correction.

DETAILED DESCRIPTION

Embodiments of the present invention will be described below. Throughoutthe drawings, the same reference numerals indicate the same parts.

FIG. 1 is a block diagram showing the configuration of a system whichincludes a robot program correcting apparatus according to the presentinvention. In the figure, reference numeral 11 is a computer such as apersonal computer, 12 is a display apparatus connected to the computer11, and 13 is an input means connected to the computer and implementedby a keyboard, mouse, etc. Further, reference numeral 14 is a controllerfor controlling the operation of a robot 16 by a robot operation programstored in the computer 11, 15 is a teaching apparatus for teaching therobot its working position via the controller 14 and for installing therobot operation program on the computer 11, 16 is the robot which iscontrolled by the controller 15, and 17 is a workpiece which is workedon and moved by the robot 16.

The robot program correcting apparatus according to the presentinvention is implemented by the computer 11.

Images of the robot 17, the workpiece 17 and, if needed, any peripheraldevice (not shown) are displayed simultaneously as three-dimensionaldata on the screen of the display apparatus 12.

The teaching apparatus 15 is a portable terminal that an operator usesto specify the operating position and the motion of the robot 16 whileviewing the actual motion of the robot or the image of the robotdisplayed on the screen of the display apparatus 12.

EMBODIMENT 1

FIG. 2 is a functional block diagram showing the configuration of arobot program correcting apparatus according to a first embodiment ofthe present invention. In the figure, reference numeral 20 indicates therobot program correcting apparatus connected to the display apparatus12. The robot program correcting apparatus 20 is implemented by thecomputer 11, etc. The robot program correcting apparatus 20 displaysthree-dimensional models of the robot and the workpiece simultaneouslyon the screen of the display apparatus 12, and corrects the robotoperation program. The robot program correcting apparatus 20 comprises:a touchup position storing means 21 for storing, as a plurality ofpoints, an actual position located on the workpiece by actuallyoperating the robot to touch the actual position on the workpiece thatcorresponds to the working position specified on the screen; a touchupline or touchup surface computing means 22 for computing at least eithera line or a surface based on the plurality of touchup points; a workingposition storing means 23 for storing, as a plurality of points,position information concerning the working position on the workpiecedisplayed on the screen; a robot operation program retrieving means 24for retrieving the robot operation program based on the plurality ofpoints stored in the working position storing means 23; a workingposition line or surface computing means 25 for computing at leasteither a line or a surface based on a plurality of working positionsdesignated by the robot operation program; a difference computing means26 for computing the difference between at least either the line orsurface computed from the touchup points and at least either the line orsurface computed from the points representing the working positionspecified on the screen; and a correcting means 27 for correcting therobot operation program by computing the amount of correction based onthe difference.

EMBODIMENT 2

FIG. 3 is a functional block diagram showing the configuration of arobot program correcting apparatus according to a second embodiment ofthe present invention. In the figure, the difference from FIG. 2 isthat, while the working position acquiring means 23 in FIG. 2 acquiresas a plurality of points the position information concerning the workingposition on the workpiece displayed on the screen, the apparatus of FIG.3 comprises a means 31 for retrieving, based on the touchup positioneffected by the actual robot, its associated robot operation program andworking position, and a working position line or surface computing means32 for computing at least either a line or a surface based on the robotoperation program and working position thus retrieved.

FIG. 4 is a block diagram showing the detailed configuration of therobot program correcting apparatus and the robot controller 14 accordingto the first and second embodiments. In the figure, the programcorrecting apparatus 40 is included in the computer 11. The programcorrecting apparatus 40 comprises a layout creating block 401, a workdata loading block 402, an operation program creating block 403, anoperation program retrieving block 404 for retrieving the operationprogram from the working position in the first embodiment or aretrieving block 405 for retrieving the robot operation program andworking position based on the touchup points in the second embodiment,and a program correcting block 406.

The computer 11 further includes a work data storing block 407 forstoring data concerning the workpiece 17, a robot program measuringposition storing block 408, a working position storing block 409, atouchup position storing block 410, a corrected robot program storingblock 411, and a correcting software basic functional block 412. Theprogram correcting apparatus 40 is plugged into the correcting softwarebasic functional block 412.

The robot controller 14 comprises a robot program loading block 413 forloading the robot program corresponding to the measuring position storedin the robot program measuring position storing block 408, a jogfunctional block 414 for jogging the robot in accordance with the thusloaded program, a touchup functional block 415 for teaching the touchupposition on the work to the touchup position storing block 410, a robotprogram loading block 416 for loading the corrected robot program, andan executing block 417 for executing the corrected robot program thusloaded.

Correspondences between the functional block diagrams shown in FIGS. 2and 3 and the detailed configuration shown in FIG. 4 are describedbelow.

The touchup position storing means 21 in FIGS. 2 and 3 corresponds tothe touchup position storing block 410 in FIG. 4. The working positionstoring means 23 in FIG. 2 corresponds to the working position storingblock 409 in FIG. 4. The robot operation program retrieving means 24 inFIG. 2 corresponds to the operation program retrieving block 404 in FIG.4. The robot operation program and working position retrieving means 31in FIG. 3 corresponds to the retrieving block 405 in FIG. 4. The touchupline or touchup surface computing means 22, the difference computingmeans 26, and the correcting means 27 in FIG. 2 and the working positionline or the surface computing means 32, the difference computing means33, and the correcting means 34 in FIG. 3 together correspond to theprogram correcting block 406 in FIG. 4.

FIG. 5 is a flowchart for explaining the operation of the robot programcorrecting apparatus according to the first embodiment shown in FIG. 4.In the flowchart, the layout creating block 401 in step S51 creates alayout by arranging three-dimensional data of the robot 16, theworkpiece 17 and, if needed, any peripheral device (not shown) on thescreen of the display apparatus 12. Work data relating to the image ofthe workpiece thus arranged is loaded into the working data loadingblock 402 from the work data storing block 407.

Next, in step S52, a plurality of robot operation programs for theimages of the robot and the workpiece arranged on the screen of thedisplay apparatus 12 are created using known techniques.

In step S53, using the teaching apparatus 15, the operator specifies aworking position on the images of the workpiece and the robot displayedon the screen of the display apparatus 12. This can be accomplished by anumber of methods, for example, by moving a cursor to the workingposition by a mouse and clicking on it, or by displaying all workingpositions on the screen and making a selection from them. The specifiedworking position is stored in the working position storing means 23(working position storing block 409).

Next, in step S54, the robot operation program closest to the workingposition specified in step S53 is retrieved by searching through therobot operation programs created in step S52.

Then, in step S55, the actual robot 16 is operated to touch the positionon the actual workpiece 17 corresponding to the specified workingposition, and the touchup position is stored in the actual work positionstoring means 21 (touchup position storing block 410).

Finally, in step S56, the line or surface of the working position storedin the working position storing means 23 (working position storing block409) and displayed on the screen and the line or surface of the touchuppoints stored in the touchup position storing means 21 (touchup positionstoring block 410) are computed by the working position line or surfacecomputing means 25 and the touchup line or touchup surface computingmeans 22, respectively, and the difference between them is computed bythe difference computing means 26; then, the robot operation programretrieved in step S54 is corrected based on the difference.

FIG. 6 is a flowchart for explaining the operation of the robot programcorrecting apparatus according to the second embodiment shown in FIG. 4.In the flowchart, the difference from the flowchart of FIG. 5 is thatwhile, in FIG. 5, the robot operation program is retrieved in step S54based on the working position on the screen, in FIG. 6 the robotoperation program and working position closest to the touchup positioneffected by the actual robot are retrieved in step S65; the other stepsare the same as the corresponding steps in FIG. 5, and the descriptionthereof will not be repeated here.

FIG. 7 is a diagram showing a working surface Ps displayed on the screenof the display apparatus 12 and its corresponding working surface(touchup surface) Pt touched by the actual robot 16. As shown,generally, the working surface Ps on the screen is displaced from thetouchup surface Pt by a vector D. Open circles indicate teach points;since the teach points specified on the screen are displaced from theteach points taught to the actual robot, the robot operation program iscorrected by the above means to compensate for the displacement.

Next, a specific method of correction for the robot operation programwill be described.

First, from working positions Qsj on the screen, a working surfacePs(u,w) is computed using a matrix Nij so that the surface becomes aspline surface as defined by the following equation. Here, the subscripts in Qsj denotes “surface” representing the three-dimensional surfaceposition of the working surface, and j denotes an index to the workingpoint on the working surface. Further, u and w are parameters each ofwhich takes a value from 0 to 1.Ps(u,w)=ΣNij(t)Qsj

Similarly, from touchup points Qtj, a touchup surface Pt(u,w) iscomputed so that the surface becomes a spline surface.

Next, a difference unit normal vector e(u,w) and an offset distance dare computed using the following equations.

Difference D(u,w) between the two surface isD(u,w)=Ps(u,w)−Pt(u,w)e(u,w)=D(u,w)/|D(u,w)|d=|D(u,w)|

Next, each teach point Pr(i) of the robot operation program, created onthe screen, is corrected as shown below in accordance with the abovedifference vector.

Transform matrix=(n, o, a, D(u,w))

n=(1, 0, 0)

o=(0, 1, 0)

a=(0, 0, 1)

Here, n, o, and a are parameters usually used in a link coordinatesystem in robotics to define the position and orientation of the end ofa robot arm, and denote “normal”, “orient”, and “approach”,respectively. Further, D(u,w) is the difference vector obtained by theabove equation, and represents the location.

In the first embodiment, the teach point Pn(i) after the transform isPn(i)=MPr(i)and in the second embodimentPn(i)=XPr(i)where the matrix X is

$\begin{matrix}{X = {R\left( {e,\alpha} \right)}} & \; & \; \\{{e_{x}^{2}V_{\alpha}} + C_{\alpha}} & {{e_{x}e_{y}V_{\alpha}} - {e_{z}S_{\alpha}}} & {{e_{x}e_{y}V_{a}} + {e_{y}S_{\alpha}}} \\{= {{e_{x}e_{y}V_{a}} + {e_{z}S_{\alpha}}}} & {{e_{y}^{2}V_{\alpha}} + C_{\alpha}} & {{e_{y}e_{z}V_{\alpha}} - {e_{x}S_{\alpha}}} \\{{e_{x}e_{z}V_{\alpha}} - {e_{y}S_{\alpha}}} & {{e_{y}e_{z}V_{\alpha}} + {e_{x}S_{\alpha}}} & {{e_{z}^{2}V_{\alpha}} + C_{\alpha}} \\{e = \left( {e_{x},e_{y},e_{z}} \right)} & \; & \; \\{V_{\alpha} = {1 - {\cos\;\alpha}}} & \; & \; \\{C_{\alpha} = {\cos\;\alpha}} & \; & \; \\{S_{\alpha} = {\sin\;\alpha}} & \; & \; \\\; & \; & \;\end{matrix}$

N is defined by assuming that α=0

FIG. 8 is a diagram showing the relationship between the position of therobot and the position of the workpiece after the above correction. Letthe position of the robot before the correction be represented by avector R and that of the workpiece by a vector W, and assume that theworking surface Ps on the screen is displaced from the touchup surfacePt by a vector D; then, the work position vector Wd after the correctionis the scalar product W.D of the vector W and the vector D, as shown.

Next, a description will be given of how the robot's D-H parameters arechanged by the robot program correcting apparatus. The D-H parametersare known parameters that are set using the Denavit-Hartenbergconvention.

The position and orientation of the TCP (Tool Center Point) of the robotis given by the multiplication of all the link matrices. The TCP is theposition of the robot's end and is defined by three-dimensionalcoordinates.

In the first embodiment, if there are six axes of links, denoted by A1,A2, A3, A4, A5, and A6, respectively, and the tool matrix is denoted byT, then TCP is given as

TCP=A1A2A3A4A5A6T

When the layout of the workpiece is corrected, the working positiondependent on the workpiece is also corrected automatically. At the sametime, each teach point of the robot operation program on the robotprogram correcting apparatus is also corrected.

A comparison is further made between each teach point on the robotprogram correcting apparatus (on the screen) and its correspondingtouchup point, and the difference is added to the link position andorientation (θ, α) defined by the robot's D-H parameters on thecorrecting apparatus.

A=(n, o, a, 1)

n=(cθ, sθ, 0, 0)

o=(−cαsθ, sαcθ, sα, 0)

a=(sαsθ, −sαsθ, cα, 0)

l=(Acθ, As♭, sα, 1)

where l denotes the location

For each touchup point Ti(x, y, z, w, p, r) and I=1,n, where w, p, and rrespectively denote the yaw, pitch, and roll angles known as the anglesdescribing the orientation of the coordinate system, θt and αt arecalculated by solving the simultaneous equationsTi=A1iA2iA3iA4iA5iA6iTI=1,n

For the working position on the screen, θs and αs are obtained in likemanner.Difference θd=θt−θs, θd=αt−αs

These differences are added to the elements corresponding to the D-Hparameters to correct the D-H parameters. The corrected parameters areused from the next time.

Next, a description will be given of how the robot operation program andworking position closest to the touchup point are retrieved in thesecond embodiment.

First, from the set of touchup points, a spline curve is created byjoining the points.

Similarly, from the set of teach points of the robot operation program,a spline curve is created by joining the points.

Touchup points Ti (xi, zi, zi, wi, pi, ri)

Teach points Ki (xi, yi, zi, wi, pi, ri)

The respective spline curves are given byPti(t)=N0(t)Ti−1+N1(t)Ti+N2(t)Ti+1+N3(t)Ti+2Pki(t)=N0(t)Ki−1+N1(t)Ki+N2(t)Ki+1+N3(t)Ki+2

Then, the difference between them is obtained, and the robot operationprogram that minimizes this difference is selected. Further, the workingposition corresponding to it is also selected.

It should be noted that the meanings of the terminologies used in claimsare not limited to the meanings of the terminologies used in theDETAILED DESCRIPTION.

As is apparent from the above description, the present invention offersthe following effects.

(1) Operation can be simplified when applying an off-line-createdprogram to the field.

(2) The number of steps, that are required when applying an off-linecreated program to the field, can be reduced.

1. A robot program correcting apparatus which displays three-dimensionalmodels of a robot and a workpiece simultaneously on a screen of adisplay apparatus, and corrects an operation program for said robot,said apparatus comprising: touchup position storing means for storing,as a plurality of points, an actual position located on said workpieceby actually operating said robot to touch said actual position on saidworkpiece that corresponds to a working position specified on saidscreen; touchup line or touchup surface computing means for computing atleast either a line or a surface based on said plurality of touchuppoints; working position storing means for storing, as a plurality ofpoints, position information concerning said working position on saidworkpiece displayed on said screen; robot operation program retrievingmeans for retrieving said robot operation program based on saidplurality of points stored in said working position storing means;working position line or surface computing means for computing at leasteither a line or a surface based on a plurality of working positionsdesignated by said robot operation program; difference computing meansfor computing (i) a difference unit normal vector and (ii) an offsetdistance from a difference between (a) the surface calculated based onsaid working points and the surface calculated based on said touchuppoints, or between (b) the line calculated based on said working pointsand the line calculated based on said touchup points; and correctingmeans for correcting said robot operation program by computing theamount of correction based on said difference.
 2. A robot programcorrecting apparatus as claimed in claim 1, further comprising:operation program storing means for storing a plurality of robotoperation programs by generating said programs based on positions ofsaid robot and said workpiece arranged on said screen; and workingposition specifying means for specifying on said screen a workingposition at which said robot works on said workpiece arranged on saidscreen.
 3. A robot program correcting apparatus as claimed in claim 1,wherein the line and the surface calculated based on said working pointsor based on said touchup points are a spline curve and a spline surface,respectively.
 4. A robot program correcting apparatus as claimed inclaim 1, wherein the amount of correction for said operation program isobtained by correcting a mechanism model of said robot based on saiddifference.
 5. A robot program correcting apparatus as claimed in claim4, wherein said mechanism model of said robot is a D-H parameter.
 6. Arobot program correcting apparatus which displays three-dimensionalmodels of a robot and a workpiece simultaneously on a screen of adisplay apparatus, and corrects an operation program for said robot,comprising: touchup position storing means for storing, as a pluralityof points, an actual position located on said workpiece by actuallyoperating said robot to touch up said actual position on said workpiecethat corresponds to a working position specified on said screen; meansfor retrieving, based on said touchup position, a robot operationprogram and working position associated with said touchup position;touchup line or touchup surface computing means for computing at leasteither a line or a surface based on said plurality of touchup points;working position line or surface computing means for computing at leasteither a line or a surface based on a plurality of points representingsaid retrieved working point; difference computing means for computing adifference between at least either said line or surface computed fromsaid touchup points and at least either said line or surface computedfrom said points representing said retrieved working position; andcorrecting means for correcting said robot operation program bycomputing the amount of correction based on said difference.
 7. A robotprogram correcting apparatus as claimed in claim 6, further comprising:operation program storing means for storing a plurality of robotoperation programs by generating said programs based on positions ofsaid robot and said workpiece arranged on said screen; and workingposition specifying means for specifying on said screen a workingposition at which said robot works on said workpiece arranged on saidscreen.
 8. A robot program correcting apparatus as claimed in claim 6,wherein the line and the surface calculated based on said working pointsor based on said touchup points are a spline curve and a spline surface,respectively.
 9. A robot program correcting apparatus as claimed inclaim 6, wherein the amount of correction for said operation program isobtained by correcting a mechanism model of said robot based on saiddifference.
 10. A robot program correcting apparatus as claimed in claim9, wherein said mechanism model of said robot is a D-H parameter.